package com.hzdl.service;

import com.hzdl.bean.AssetPlace;
import com.hzdl.dao.AssetPlaceDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * author:Administrator
 * date:2018\9\10 0010
 * description:
 */
@Service
public class AssetPlaceService {
    @Autowired
    private AssetPlaceDao assetPlaceDao;
    //根据分公司名字获取id
    public int getIdByPlace(String place){
        return assetPlaceDao.getAssetPlaceIdByPlace(place);
    }
    //根据分公司id获取分公司
    public AssetPlace getApById(int id){
        return assetPlaceDao.getApById(id);
    }
    //获取所有分公司
    public List<AssetPlace> getAllAp(){
        return assetPlaceDao.getAllAp();
    }
}
